<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.grep.extra.dao.impl.User" %>
<%
	request.setCharacterEncoding("UTF-8");
	response.setCharacterEncoding("UTF-8");  
	String username = (String)session.getAttribute("username");
	String password = (String)session.getAttribute("password");
	
	boolean checkresult;
	if(username==null || password==null ){
		checkresult=false;
	}else{
		checkresult=true;
	}
	//else{
		//User user = new User();
		//checkresult = user.checkUserExist(username, password);
//	}
	
	if(!checkresult){
%>
<script>
	
	alert("未登录，没有权限访问此页面，正在跳转登录页面")
	window.location.href='http://localhost:8080/grep/login.jsp';
</script>
<%}%>